using System;
using System.Collections.Generic;
using System.Text;
using QLKS.HeThongBUS;
using QLKS.HeThongDAO;
using System.Data;

namespace QLKS.HeThongBUS
{
    public enum DV_BUSResult
    {
        OK,
        DAOERROR,
    }
    class DV_BUS
    {
        public static DataTable DSLoaiDV()
        {
            return DV_DAO.SelectAllLoaiDV();
        }

        public static DV_BUSResult ThemDV(DV_DTO DV)
        {
            if (!DV_DAO.Insert(DV))
                return DV_BUSResult.DAOERROR;
            return DV_BUSResult.OK;
        }

        public static DV_BUSResult UpdateDV(DV_DTO DV)
        {
            if (!DV_DAO.UpdateDV(DV))
                return DV_BUSResult.DAOERROR;
            return DV_BUSResult.OK;
        }

        public static DV_BUSResult DeleteDV(DV_DTO DV)
        {
            if (!DV_DAO.DeleteDV(DV))
                return DV_BUSResult.DAOERROR;
            return DV_BUSResult.OK;
        }
    }
}
